/*
* coder: Dzlua
* email: 505544956@qq.com
* time : 2018-04-11 10:00
*/

#include "ui/ui.hpp"

#include <iostream>

class MyCls : public ui::CSingleton<MyCls>
{
public:
    MyCls(int i) : m_n(i) {}
    void print() { std::cout << m_n << std::endl; }
    int m_n;
};

int main(int argc, char** argv)
{
    // you must call this function at least once before use it.
    auto a = MyCls::init_instance(10);
    a->print();

    // use this function to get a instance.
    auto b = MyCls::instance();
    b->print();
    return 0;
}